package com.moli.iov.admin.web.controller;

import com.moli.iov.admin.model.vo.req.CommandVo;
import com.moli.iov.admin.service.IBaseCityService;
import com.moli.iov.rest.RestResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * The type Base city controller.
 *
 * @author wanghualin
 * @date 2019 -10-17 16:54:08
 */
@Slf4j
@RestController
@RequestMapping("/base/baseCity")
public class BaseCityController extends BaseController {

  @Autowired
  private IBaseCityService iBaseCityService;

  /**
   * 省市
   */
  @RequestMapping("/getProvinceCityTree")
  public RestResponse getProvinceCityTree() {

    return iBaseCityService.getProvinceAndCity();
  }

  /**
   * 省-市 -区。。。
   */
  @RequestMapping("/getProvinceTree")
  public RestResponse getProvinceTree() {
    return iBaseCityService.queryAllAddressDtoTree();
  }
}
